import request from '../utils/request';
import axiosRequest from '../utils/axiosRequest'
import qs from 'qs'
//查询方法
export async function globalQuery({url,params}) {//get 
    return request(`${url}?${qs.stringify(params)}`);
}
export async function globalPostQuery({url,params}) {//post 
    const userinfo = JSON.parse(sessionStorage.getItem('userInfo'));
    if(userinfo){
        let usData = { 
            ...params,
            emp_name:userinfo[0].emp_name,
            ts_employee_id:userinfo[0].ts_employee_id
        } 
        params = usData;
    }       
    return axiosRequest(`${url}`,params);
}
